package com.ailk.bi.cq.cqbiaudit.common
{
	import mx.collections.ArrayCollection;
	import mx.controls.Alert;
	import mx.managers.CursorManager;
	import mx.rpc.events.FaultEvent;

	public class Util
	{
		
		public static function isNull(value:String):Boolean{
			return value == null || value.length == 0;
		}
		
		public static function isNotNull(value:String):Boolean{
			return !isNull(value);
		}
		
		//公共的失败提示
		public static function faultHandler(event:FaultEvent):void{
			CursorManager.removeBusyCursor();
			//Alert.show(event.fault.faultString + event.fault.message,"错误");
			Alert.show(event.fault.faultString,"错误");
		}
		
		public static function addAll(base:ArrayCollection, src:ArrayCollection):void{
			if(src != null){
				base.addAll(src);
			}			
		}
	}
}